<template>
  <div>
    <basic-container>我的历史</basic-container>
    <el-button @click="a" type="primary">主要按钮</el-button>
  </div>
</template>

<script>
  import {getUser} from "@/api/user";
  import {selectHistory} from "@/api/commodity/commodity";
  import {mapGetters} from "vuex";
  export default {
    name: "wel",
    data() {
      return {};
    },
    mounted(){
      this.selectHistory();
    },
    computed: {
      ...mapGetters([
        "userInfo",
      ])
    },
    created() {
    },
    methods: {
      selectHistory() {
        console.log(this.userInfo)
        selectHistory().then((res) => {
          console.log(res.data.data)
          });
        },
      a(a){
        getUser().then((res) => {
          console.log(res)
        });
        var id = a.currentTarget.id;
        console.log(id)
        this.$router.push({path:"/",
        })
      },

    }
  };
</script>

<style scoped="scoped" lang="scss">
</style>
